# -*- encoding: utf-8 -*-
from django.utils.html import escape
from django.utils.safestring import SafeUnicode
from django.template import Context
from django.utils.translation import ugettext as _

from sport_metrics.models import SportMetricsView
def get_context():
    all_smv = SportMetricsView.all()
    for smv in all_smv:
        (u"<li><a href=\"/sport/m/%s/\"></a></li>" % smv.key().name()).encode('utf-8')
    all_links = [(u'<li><a href="/sport/m/%s/">%s</a></li>' % (escape(smv.key().name()), 
                                                               escape(_(smv.name))))
                 for smv 
                 in all_smv]
    return Context({'sport_links':SafeUnicode(u''.join(all_links))})
